Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port terrain planner benchmark to ros2 #73

Open
wants to merge 3 commits into
base: ros2
Choose a base branch
from

Conversation

Ryanf55
Copy link
Contributor

@Ryanf55 Ryanf55 commented Nov 28, 2024

Purpose

Port the terrain planner benchmark to ROS 2, and exclude the rest from the build.
Also, update the CMakeLists and package.xml to work in ROS 2.
Finally, fix incorrect export in terrain_planner w.r.t boost components: ament/ament_cmake#456

The benchmarks are useful to test behavior, porting them to ROS 2 allows us to better test improvements.

System Usage

The terrain planner benchmark shows it occupying an entire single CPU during the test.

image

Results

For now, it will silently fail to print results by default. I'll add a follow up to create the output directory if it doesn't exist.

Note

I came across this assertion once:

[terrain_planner_benchmark_node-2] terrain_planner_benchmark_node: /home/ryan/Dev/terrain_ws/src/ethz-asl/terrain-navigation/terrain_planner/src/DubinsAirplane.cpp:1408: fw_planning::spaces::DubinsPath fw_planning::spaces::DubinsAirplaneStateSpace::dubinsRSR(double, double, double, double, double, double, double) const: Assertion `fabs(p * sinf(alpha - t) - ca + cb) < DUBINS_EPS' failed.

TODO

@Ryanf55 Ryanf55 marked this pull request as draft November 28, 2024 08:25
<arg name="runs" default="50"/>

<node pkg="tf" type="static_transform_publisher" name="world_map" args="0 0 0 0 0 0 world map 10"/>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would publish TF at 100Hz. In ROS 2, the static tf publisher is using transient local durability, so it's not necessary to republish.

@@ -164,8 +164,8 @@ int main(int argc, char** argv) {

auto grid_map_pub_ = nh.advertise<grid_map_msgs::GridMap>("grid_map", 1, true);
auto reference_map_pub_ = nh.advertise<grid_map_msgs::GridMap>("reference_map", 1, true);
auto yaw_pub = nh.advertise<visualization_msgs::Marker>("yaw", 1, true);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some of these changes are find+replace, so more are needed to get these other tests and tools to compile. I'll get them ported after this PR goes in.

add_dependencies(surface_visualization ${PROJECT_NAME} ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS} ${GDAL_LIBRARY})
target_link_libraries(surface_visualization ${PROJECT_NAME} ${catkin_LIBRARIES} ${GDAL_LIBRARY} ${OpenCV_LIBRARIES} ${OMPL_LIBRARIES})
add_executable(terrain_planner_benchmark_node)
add_executable(ompl_benchmark_node EXCLUDE_FROM_ALL)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

EXCLUDE_FROM_ALL makes it not compiled by default. They won't compile yet, each one needs ported. I was hoping to do a PR for each executable.

Signed-off-by: Ryan Friedman <[email protected]>
@Ryanf55 Ryanf55 force-pushed the port-bencmark-planner-to-ros2 branch from bb24982 to 97c31c5 Compare November 29, 2024 03:59
* Only ported the terrain_planner_benchmark_node so far, the rest are
  excluded

Signed-off-by: Ryan Friedman <[email protected]>
@Ryanf55 Ryanf55 force-pushed the port-bencmark-planner-to-ros2 branch from 97c31c5 to 6dd0c37 Compare November 29, 2024 04:00
@Ryanf55 Ryanf55 marked this pull request as ready for review November 29, 2024 04:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant